public class num27 {
    public int removeElement(int[] nums, int val) {
        int snow = 0;
        int fast = 0;
        while (fast <= nums.length){
            if(nums[fast] != val){
                nums[snow] = nums[fast];
                snow++;
            }
             fast++;
        }
        return snow;
    }
}
